import { DiceNum } from '../types/GameEnums'

/**
 * 筛盅工具类
 */
export class DiceUtil {
	/**
	 * 随机获取筛盅点数
	 */
	static rollDice(): DiceNum {
		return (Math.floor(Math.random() * 6) + 1) as DiceNum
	}
	/**
	 * 筛盅点数是否有效
	 */
	static isValidDice(value: number): boolean {
		return value >= 1 && value <= 6
	}
}
